<%@ page language="java" pageEncoding="UTF-8"%>  
<%@ taglib prefix = "c" uri="http://java.sun.com/jsp/jstl/core"%>
<%  
String path = request.getContextPath();  
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";  
%>  
<!DOCTYPE html>  
<html>  
<head>  
<base href="<%=basePath%>">  
</head>  
<body>  
 	<h1>单个文件上传</h1>
 	<form action= "<%=path%>/sysmanage/test/uploadFile.do" method = "post" enctype="multipart/form-data">
 		<input type ="file" name = "uploadFile">
 		<h2><input type = "submit" value = "单个文件上传"></h2>	
 	</form>
    <h2>刚才上传的图片</h2>
    <c:if test= "${uploadFilePath!=null}">
    	<img src = "<%=basePath%>${uploadFilePath}" width = "200" height="200">
    </c:if>
    
    
    
    <h1>多个文件上传</h1>
 	<form action= "<%=path%>/sysmanage/test/uploadFileBatch.do" method = "post" enctype="multipart/form-data">
 		<input type ="file" name = "uploadFileBatch">
 		<input type ="file" name = "uploadFileBatch">
 		<input type ="file" name = "uploadFileBatch">
 		
 		<h2><input type = "submit" value = "多个文件上传"></h2>	
 	</form>
    <h2>刚才上传的图片</h2>
	  <table>
	  	<tr>
	  		<c:forEach items = "${uploadMap}" var="item">
	  			<td>
	  				<a href="<%=path%>/sysmanage/test/downloadFile.do?fileName=${item.value}" >${item.key}</a>　: 
	  				
	  				<img src = "<%=basePath%>upload/${item.value}" width = "200" height="200">	
	  				 
	  				 				
	  			</td>	  			
	  		</c:forEach>
	  	</tr>	  
	  </table>   
</body>
</html>